<?php

namespace App\Models\CarModels;

use Illuminate\Database\Eloquent\Model;

class CarArea extends Model
{
    //
    protected $table = 'carareas';
    protected $fillable = ['name','city_id'];

    public function city(){
        return $this->belongsTo(CarCity::class,'city_id')->select('id','name');
    }
    public function car(){
        return $this->hasMany(CarInfo::class,'areas_id')->with('kind');
    }

}
